Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I was trying to understand #6116 and got stuck, because the block indices are named a bit confusingly. This PR just tries to make the use of the block indices a bit more consistent and easier to read. Note that in some places we create block vectors with only the Stokes blocks (velocity and/or pressure blocks) and translate between full solution vectors and only the Stokes vectors. We currently assert that those indices are the same between those two vectors (velocity block == 0; pressure block == 1 (iterative solver) or 0 (direct solver)), which is why I used the same block index variables for both. This could theoretically change in the future, but it hasnt in the past ten years, and until we do I just think it is easier to read
distributed_stokes_solution.block(velocity_block_index)
thandistributed_stokes_solution.block(0)
or introducing another index variable which just happens to be the same as the existing one.This PR should not change any tests.